//
//  VideoCollectionCell.m
//  ToYourHeartNews
//
//  Created by XJing on 16/1/29.
//  Copyright © 2016年 www.lanou3g.com 蓝鸥. All rights reserved.
//

#import "VideoCollectionCell.h"

@implementation VideoCollectionCell
- (void)dealloc
{
    [_timeLable release];
    [_titleLable release];
    [_replyLable release];
    [_picture release];
    [super dealloc];
}
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        self.titleLable = [[UILabel alloc]init];
//        _titleLable.backgroundColor = [UIColor orangeColor];
        [self.contentView addSubview:_titleLable];
        [_titleLable release];
        
        self.timeLable = [[UILabel alloc]init];
//        _timeLable.backgroundColor = [UIColor redColor];
        [self.contentView addSubview:_timeLable];
        [_timeLable release];
        
        self.replyLable = [[UILabel alloc]init];
//        _replyLable.backgroundColor = [UIColor yellowColor];
        [self.contentView addSubview:_replyLable];
        [_replyLable release];
        
        self.picture = [[UIImageView alloc]init];
//        _picture.backgroundColor = [UIColor greenColor];
        [self.contentView addSubview:_picture];
        [_picture release];
    }
    return self;
}
-(void)layoutSubviews
{
    [super layoutSubviews];
    self.titleLable.frame = CGRectMake(20, 10, self.contentView.frame.size.width / 3 * 2 - 20, self.contentView.frame.size.height / 2 - 20);
    self.timeLable.frame = CGRectMake(20, _titleLable.frame.origin.y + _titleLable.frame.size.height + 30, _titleLable.frame.size.width / 2, _titleLable.frame.size.height / 2);
    _timeLable.font = [UIFont systemFontOfSize:14];
    _timeLable.textColor = [UIColor grayColor];
    self.replyLable.frame = CGRectMake(_timeLable.frame.origin.x + _timeLable.frame.size.width + 5, _timeLable.frame.origin.y, _timeLable.frame.size.width, _timeLable.frame.size.height);
    _replyLable.font = [UIFont systemFontOfSize:14];
    _replyLable.textColor = [UIColor grayColor];
    self.picture.frame = CGRectMake(_titleLable.frame.origin.x + _titleLable.frame.size.width + 20, _titleLable.frame.origin.y, self.contentView.frame.size.width - _titleLable.frame.size.width - 50, self.contentView.frame.size.height - 30);
}
- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
